Fix JobsHelper#agent_from_job for ActiveJob

Dominik Sander 9 years ago
parent
commit
f81ac006cf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/helpers/jobs_helper.rb

+ 1 - 1
app/helpers/jobs_helper.rb

@@ -25,7 +25,7 @@ module JobsHelper
25 25
   # Can return nil, or an instance of Agent.
26 26
   def agent_from_job(job)
27 27
     begin
28
-      Agent.find_by_id(YAML.load(job.handler).args[0])
28
+      Agent.find_by_id(YAML.load(job.handler).job_data['arguments'][0])
29 29
     rescue ArgumentError
30 30
       # We can get to this point before all of the agents have loaded (usually,
31 31
       # in development)